package model

import (
	"engine/consts"
	emodel "engine/model"
)

type SystemErrorReq struct {
	Code     *int   `json:"code" form:"code"`
	Message  string `json:"message" form:"message"`
	Page     int    `json:"page" form:"page" default:"1"`
	PageSize int    `json:"pageSize" form:"pageSize" default:"30"`
}

type SystemErrorResp struct {
	Code       int    `json:"code"`
	CodeString string `json:"codeString"`
	MessageCN  string `json:"messageCN"`
	MessageTw  string `json:"messageTw"`
	MessageEN  string `json:"messageEN"`
}

type SearchSystemErrorLogReq struct {
	CreatedAt []string              `json:"createdAt" form:"createdAt"`
	ProcessId string                `json:"processId" form:"processId"`
	Status    consts.SysErrorStatus `form:"status"`
	PublicSearchData
}

type UpdateSystemErrorLogReq struct {
	Status consts.SysErrorStatus `form:"status"`
	Remark string                `json:"remark" form:"remark"`
}

type SystemConfigData struct {
	Name   string              `json:"name" form:"name" binding:"required"`
	Code   string              `json:"code" form:"code" binding:"required"`
	Value  emodel.JSONType     `json:"value" form:"value" binding:"required"`
	Remark string              `json:"remark" form:"remark"`
	Status consts.CommonStatus `json:"status" form:"status" binding:"required"`
}

type SystemConfigurateBase struct {
	BaseDetail
}

type SearchSystemConfigBaseReq struct {
	Data []BaseDetail `json:"data"`
}

type BaseDetail struct {
	Code   string          `json:"code"`
	Name   string          `json:"name"`
	Value  emodel.JSONType `json:"value"`
	Remark string          `json:"remark"`
}
